<!--
 * @Descripttion: 
 * @version: 1.0
 * @Author: Sam
 * @Date: 2021-12-01 09:57:01
 * @LastEditors: Sam
 * @LastEditTime: 2021-12-01 17:21:40
-->
{include file="public/header"}
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-card">
            <div class="layui-card-header">{$page_title}</div>
            <div class="layui-card-body">
                {:access_button('MgGroup/add_group')}
                <table class="layui-table">
                    <thead>
                    <tr>
                        <th>管理组名称</th>
                        <th>管理员人数</th>
                        <th>状态</th>
                        <th>最后修改时间</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {foreach $list as $item}
                    <tr>
                        <td>{$item.group_name|raw}</td>
                        <td>{$item.group_people}</td>
                        <td>{$item.status == 1 ? '正常' : '禁用'}</td>
                        <td>{$item.update_time|date='Y-m-d H:i:s'}</td>
                        <td>
                            {if condition="$item['access'] != '*'"}
                            {:access_button('MgGroup/edit_group', ['id'=>$item['id']], '编辑')}
                            {:access_button('MgGroup/del_group', ['id'=>$item['id']], '删除', 'confirm')}
                            {/if}
                        </td>
                    </tr>
                    {/foreach}
                    </tbody>
                </table>
                {$page|raw}
            </div>
        </div>
    </div>
</div>
{include file="public/footer" /}